extends layout

block content
  h1= title
  p Welcome to #{title}
  nav.userBar
    li Hello, #{user}
    li
      a(href= '/admin/publish') publish
  .productList
    h2 The products you had published
    if(prod.length > 0)
      ol
        each item in prod
          li
            .publisher publisher: #{item.username}
            .name name: #{item.name}
            .description description: #{item.description}
            .price price:￥ #{item.price}元
            .catagory catagory: #{item.catagory}
            button.del(data-id="#{item._id}") delete
            button.upd(data-id="#{item._id}") updata
    else
      p.prodNone You havan't pubulish any product
    .updPad
      form#publishForm(method="post" action="/admin/publishSucc")
        .formDiv
          label name:
          input.formInput(name="name")
        .formDiv
          label description:
          textarea.formText(name="description")
        .formDiv
          label catagory:
          input.formInput(name="catagory")
        .formDiv
          label price:
          input.formInput(name="price" type="number")
        .formDiv
          input(type='submit' value='修改')

  script(src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js")
  script(src="/javascripts/admin.js")
